package com.tiro.springboot.sample.service;

import com.googlecode.jsonrpc4j.JsonRpcService;
import com.tiro.springboot.sample.po.User;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.util.List;

@Validated
@JsonRpcService("/api/jsonrpc/sampleService")
public interface SampleService {
    User getUser(@NotNull @Positive Long id, @NotBlank String str, @NotEmpty List<@NotBlank String> list);

    String hello2(@NotNull @Valid User user);
}
